package com.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.beans.StudentInfo;
import com.mapper.StudentMapper;
import com.service.StudentService;

@Service
@Transactional
public class StudentServiceImpl implements StudentService {
	/*
	 * 学生查询
	 */
	@Resource
	StudentMapper studentMapper;

	@Override
	public StudentInfo getStuById(Integer id) {
		return studentMapper.getStuById(id);
	}

	@Override
	public List<StudentInfo> getStuList(Map<String, Object> m) {
		return studentMapper.getStuList(m);
	}

	@Override
	public void addStu(StudentInfo student) {
		studentMapper.addStu(student);

	}

	@Override
	public void deleteStuById(Integer id) {
		studentMapper.deleteStuById(id);

	}

	@Override
	public StudentInfo getUserByName(String stuName) {
		return studentMapper.getUserByName(stuName);
	}

	@Override
	public void saveStu(StudentInfo stu) {
		studentMapper.saveStu(stu);

	}
}
